# This is a Python3 Script used to generate model files of colorful gekotas
import json

colors = ["black","blue","brown","cyan","gray","green","light_blue","light_gray","lime","magenta","orange","pink","purple","red","white","yellow"]

# Model Template
def getColor(color):
    return {
      "parent": "minecraft:item/generated",
      "textures": {
        "layer0": "misaka:item/gekota_" + color
      }
    }

# Colorful Gekotas...
for col in range(0, len(colors)):
    with open('gekota_' + colors[col] + '.json', 'w+') as f:
        data = json.dumps(getColor(colors[col]), sort_keys=True, indent=4, separators=(',', ': '))
        f.write(data)

'''
# And by the way, Java block definitions...
def getDef(color):
    return 'public static final RegistryObject<Block> GEKOTA_' + color.upper() + ' = BLOCKS.register("gekota_' + color + '",() -> new GekotaBlock(BlockBehaviour.Properties.of(Material.BAMBOO).strength(0.5F).sound(SoundType.WOOD)));'

for col in range(0, len(colors)):
    print(getDef(colors[col]))
'''
